const app = {
    // 最小化
    minimize(){
        window.electron.ipcRenderer.invoke("renderer-to-main", {
            name: 'app-minimize',
            event: 'event',
            data: null
        })
    },
    // 退出应用
    exit: () => {
        window.$dialog.error({
            maskClosable: false,
            title: '系统提示',
            content: '您确定要退出吗？',
            negativeText: '取消',
            positiveText: '确定',
            onPositiveClick: () => {
                window.electron.ipcRenderer.invoke("renderer-to-main", {
                    name: 'app-quit',
                    event: 'event',
                    data: null
                })
            },
            onNegativeClick: () => {
                window.$dialog.destroyAll()
            }
        })
    }
}

export default app
